package com.songlanyun.modules.ship.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import com.songlanyun.common.enums.OrderConstant;
import com.songlanyun.common.validator.group.AddGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 自提订单的包裹信息，包裹可核销
 * 
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-19 13:49:32
 */
@Data
@TableName("yxt_sale_order_package_pickup")
public class OrderPackagePickup extends RootEntity<Long,OrderPackagePickup> implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 包裹id
	 */
	@NotNull(message = "包裹id不能为空")
	private Long goodsPackageId;
	/**
	 * 核销码
	 */
	@NotBlank(message = "必需设置核销码")
	private String verificationCode;
	/**
	 * 自提发货说明
	 */
	@Length(max = 500,message = "自提发货说明长度在500个字")
	private String remark;
	/**
	 * 0待核销，1已核销（核销后，即为用户收货完成，要改变相应的订单上收货状态）
	 */
	private Boolean verificationStatus;
	/**
	 * 核销时间
	 */
	private Date verificationTime;
	/**
	 * 0无，1商家管理员，2系统自动核销(过期自动核销）
	 */
	private OrderConstant.VerificationRole verificationRole;

	@Override
	public Long getIdentity() {
		return getId();
	}
}
